CC ?= arm-poky-linux-gnueabi-gcc
LD ?= arm-poky-linux-gnueabi-ld

INCLUDE = -I./iniparser -I./common/include -I./include -I./

LIBS    += -lm -lasound -lpthread
LIBS    += -L./lib -lADT_AECG4_cortex-a9_V5_04_03_hf_fpic -ladt_agc_v3_07_01_hf_fpic -ladt_nr2_V3_04_hf_fpic
#LIBS    += -L./lib -ladt_agc_v3_07_01_hf_fpic -ladt_nr2_V3_04_hf_fpic -lADT_AECG4_cortex-a9_V5_04_03_hf_fpic 
#LIBS    += -L/opt/poky/1.5.3/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/ -lasound -lpthread
#LIBS    += -L/opt/fsl-imx-x11/3.14.52-1.1.0/sysroots/cortexa9hf-vfp-neon-poky-linux-gnueabi/usr/lib/ -lasound -lpthread

#CFLAGS  += -Wall -g
CFLAGS  += -g

SRCS = $(wildcard *.c */*.c) 
OBJS = $(patsubst %.c, %.o, $(SRCS)) 
NAME = $(wildcard *.c) 

#TARGET = $(patsubst %.c, %, $(NAME)) 
TARGET = gytaecd

$(TARGET):$(OBJS) 
	$(CC) $(CFLAGS) -o $@ $^ $(LIBS)

%.o:%.c 
	$(CC) $(CFLAGS) -o $@ -c $< $(INCLUDE)

clean: 
	rm -rf $(TARGET) $(OBJS)
